package com.hitgo.soccer.utils;

import java.util.Random;

public class CalcUtil
{
	private static  Random rand = new Random();
	
	public static int nextInt(int max)
	{
		return rand.nextInt(max);
	}
	
	public static double getDistance(double x1, double y1, double x2, double y2)
	{
		double dX = Math.abs(x2 - x1);
		dX *= dX;
		
		double dY = Math.abs(y2 - y1);
		dY *= dY;
		
		return Math.sqrt(dX + dY);
	}
}
